import { createRouter, createWebHistory } from "vue-router";

const routes = [{
        name: "game",
        path: "/game",
        component: () =>
            import ("@/views/game"),
        meta: {
            keepAlive: false,
        },
    },
    {
        name: "index",
        path: "/",
        component: () =>
            import ("@/views/index"),
        meta: {
            keepAlive: false,
        },
    },
];

const router = createRouter({
    routes,
    history: createWebHistory(),
});

// router.beforeEach((to, from, next) => {
//   const title = to.meta && to.meta.title;
//   if (title) {
//     document.title = title;
//   }
//   next();
// });

export { router };